package org.hepeng.hope.entity

import org.hibernate.annotations.ColumnDefault
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Table
import org.hepeng.hope.entity.Entity as E


const val UI_RESOURCES_TABLE_NAME = "ui_resources"


@Entity
@Table(name = UI_RESOURCES_TABLE_NAME)
internal data class UIResources(
    @Column(nullable = false) @ColumnDefault("0") var parentId: Long? = null,
    @Column(name = "`order`" , nullable = false) @ColumnDefault("0") var order: Int? = null,
    @Column(nullable = false) var authorityId: Long ,
    @Column(nullable = false) var uiName: String ,
    @Column(nullable = false) var type: String ,
    @Column(nullable = false) @ColumnDefault("''") var url: String ,
    @Column(nullable = false , length = 20) @ColumnDefault("''") var requestMethod: String ,
    @Column(name = "`desc`", nullable = false) @ColumnDefault("''") var desc: String? = null
) : E()